////////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2010 galaxy.org
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////

package org.galaxy.richflex.components
{
	import org.galaxy.richflex.skins.MDIWindowSkin;
	
	import spark.components.Button;
	import spark.components.ToggleButton;

	/**
	 * MDI window. This window can be added into any containers. There are min/max buttons on
	 * the top of the frame.
	 * 
	 * @author Cheng Liang
	 * 
	 * @version 0.0.1 create 2010-9-9
	 */
	public class MDIWindow extends Dialog
	{
		
		// --------------------------------------------------------------------------
		//
		// Properties
		//
		// --------------------------------------------------------------------------
		
		// ------------------------------
		// minButton
		// ------------------------------
		
		[SkinPart(required="true")]
		/**
		 * Minimize MDI window.
		 */
		public var minButton : Button;
		
		// ------------------------------
		// maxRestoreButton
		// ------------------------------
		
		[SkinPart(required="true")]
		/**
		 * Maximize or restore MDI window.
		 */
		public var maxRestoreButton : ToggleButton;
		
		[Bindable]
		/**
		 * Tooltip of minimal button.
		 */
		public var minLabel : String = "Minimal";
		
		[Bindable]
		/**
		 * Tooltip of maximum button.
		 */
		public var maxLabel : String = "Maximum";
		
		[Bindable]
		/**
		 * Tooltip of restore button.
		 */
		public var restoreLabel : String = "Restore";
		
		[Bindable]
		/**
		 * Tooltip of close button.
		 */
		public var closeLabel : String = "Close";
		
		// --------------------------------------------------------------------------
		//
		// Constructor
		//
		// --------------------------------------------------------------------------
		
		public function MDIWindow()
		{
			super();
			resizable = true;
			setStyle("skinClass", MDIWindowSkin);
		}
	}
}